package com.william.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Index class
 *
 * @author william
 * @date 2020/9/17
 */
@RestController
public class Index {
    @Value("${spring.application.name}")
    private String serviceName;
    @RequestMapping(value="hello",method = RequestMethod.GET)
    public String hello(){
        return String.format("%s-%s","hell world",serviceName);
    }
}
